/*
 *	ChessController.h
 *
 *	Implementation of IChessController.h, used to link View with Controller and Controller with Model
 */

#ifndef CHESSCONTROLLER_H_
#define CHESSCONTROLLER_H_
#include "IChessController.h"
#include "../../view/inc/ChessView.h"
#include "HumanPlayer.h"
#include "ComputerPlayer.h"
#include "../../model/inc/ModelControlLinker.h"

class ChessController: public IChessController{
private:
	ModelControlLinker model;		//facade Link to model
	I_ChessPlayer* player1;
	I_ChessPlayer* player2;			//The two Players
	char* gameName;					//Used for determining if the gave already has a save file
	Color turn;
	ChessView* view;
public:

	ChessController(int arg);		//Constructor
	virtual ~ChessController();		//Deconstructor
	void on_CellSelected(int row, int col, int button);	//Implemented Methods from Interface
	void on_DragStart(int row,int col);
	bool on_DragEnd(int row,int col);
	void on_NewGame();
	void on_SaveGame();
	void on_SaveGameAs();
	void on_LoadGame();
	void on_UndoMove();
	void on_QuitGame();
	void on_TimerEvent();
	void SetView(IChessView* view);
};

#endif /* CHESSCONTROLLER_H_ */
